 {% extends 'base4bs.html' %}
 {% from 'macros.html' import form_field %}
 {% block content %}
    <div class="container">
        <form method="post" enctype="multipart/form-data">
            {{ form.csrf_token }} <!-- 渲染CSRF令牌隐藏字段 -->
            <div class="form-group">
                {{ form.photo.label }}
                {{ form.photo }}
                 {% for error in form.photo.errors %}
                    <small class="error">{{error}}</small>
                {% endfor %}
            </div>

            {{ form.submit(class='btn btn-primary') }}
        </form>
    </div>
 {% endblock %}
